﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using ProxyViewModel;
using ProxyViewModel.Commands;
namespace AutoViewModel.Tests {
	[TestClass]
	public class TestConstructorParameters {
		public class AViewModel {
			public virtual string Param1 {
				get;
				set;
			}

			public virtual string Param2 {
				get;
				set;
			}

			public virtual int Param3 {
				get;
				set;
			}

			public AViewModel(string param1, string param2, int param3) {
				Param1 = param1;
				Param2 = param2;
				Param3 = param3;
			}
		}


		[TestMethod]
		public void TestParametersArePassed() {
			AViewModel viewModel = ProxyViewModelFactory.CreateProxyViewModel<AViewModel>("param1", "param2", 34343);

			Assert.AreEqual("param1", viewModel.Param1);
			Assert.AreEqual("param2", viewModel.Param2);
			Assert.AreEqual(34343, viewModel.Param3);
		}

	}
}
